package com.kfm;

import java.lang.reflect.Field;

public class Main {
    public static void main(String[] args) throws NoSuchFieldException {
        // 声明一个合成字段
        class Example {
            private int syntheticField;
        }

        Field field = Example.class.getDeclaredField("syntheticField");

        boolean isSynthetic = field.isSynthetic();

        System.out.println("Is synthetic? " + isSynthetic); // 输出 "Is synthetic? true"
    }
}

